import java.io.Serializable;

// 学生的类
public class Student implements Serializable {

    // 属性(名词)姓名，年龄，手机号，学号等等
    private String name; // 姓名String数据类型

    private int age; // 年龄

    private int no; // 学号

    private String mobile; // 手机号

    private String sex; // 性别

    public Student() {
    }
    
    public Student(String name, int age, int no, String mobile, String sex) {
        this.name = name;
        this.age = age;
        this.no = no;
        this.mobile = mobile;
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getNo() {
        return no;
    }

    public void setNo(int no) {
        this.no = no;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", no=" + no +
                ", mobile='" + mobile + '\'' +
                ", sex='" + sex + '\'' +
                '}';
    }

    // 方法(动词)
    // 时间的方法
    public void sleep() {
        System.out.println(this.name + "睡觉");
    }

    // 走
    public void go(String target) {
        System.out.println(this.name + "go go go " + target);
    }
}
